{{useCss "app-pages/css/cart.scss"}}
<div class="menubox">
    <div class="box">
        <div class="mleft">
            我的购物车
        </div>
    </div>
</div>
<div class="_cart">
    <div class="cartbox">
        <table>
            <thead>
                <td></td>
                <td>商品</td>
                <td>单价(元)</td>
                <td>数量</td>
                <td>小计(元)</td>
                <td>操作</td>
            </thead>
            {{#if user.cart_detail.length}} {{#each user.cart_detail}} {{#each goods_info}}
            <tr>
                <td>
                    <href to="/goods_details.html?id={{goods_id}}">
                        <img bind-src="{{goods.preview_img_url}}?imageView/1/h/120" />
                    </href>
                </td>
                <td>
                    <span style="font-weight: bold;">{{goods.goods_name}}</span>{{' '+goods.intro}}
                </td>
                <td>
                    {{#Fixed goods.price}}
                </td>
                <td>
                    <input event-change="{{'$Top.$Event.cart.update_cart_num'}}" class="num" type="number" min=1 max="100" value="{{num}}" bind-input="{{'num'}}" />
                </td>
                <td>
                    {{#Fixed goods.price*num}}
                </td>
                <td>
                    <a class="method" event-click="{{'$Top.$Event.cart.remove_goods'}}">删除</a>
                </td>
            </tr>
            {{/each}} {{/each}} {{#else}}
            <tr>
                <td colspan="6">
                    购物车很空~
                </td>
            </tr>
            {{/if}}
        </table>
    </div>

    <div class="blockbottom"></div>
    <div class="floatcount">
        <div class="countbox">
            <span class="price">商品原价总计：
                <span>￥{{#Fixed $Cache.cart.moni_ach.sou_cash}}</span>
            </span>
            <span class="price">运费：
                <span>￥{{#Fixed $Cache.cart.moni_ach.express_cash}}</span>
            </span>
            <span class="price">优惠：
                <span>￥{{#Fixed $Cache.cart.moni_ach.sou_cash-$Cache.cart.moni_ach.cash}}</span>
            </span>
            <span class="price">需付金额：
                <span class="money">￥{{#Fixed $Cache.cart.moni_ach.finally_cash}}</span>
            </span>
            <span class="settlement">
            {{#if $State.cart.loading_cart}}
                <android:progressCircular size="30" color="{{bus_info.config.theme.first_color}}"></android:progressCircular>
            {{#else}}
                <button event-click="{{'$Event.cart.cart_to_ach'}}">确认订单</button>
            {{/if}}
            </span>
        </div>
    </div>
</div>
